<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/4/7
  Time: 10:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>用户信息新增</title>
    <%--    引入jquery资源文件：必须在bootstrap资源文件之前引入--%>
    <script type="text/javascript" src="jquery-1.12.4/jquery-1.12.4.js"></script>
    <%--    引入bootstrap的资源文件--%>
    <script type="text/javascript" src="bootstrap-3.3.6-dist/js/bootstrap.js"></script>
    <link rel="stylesheet" type="text/css" href="bootstrap-3.3.6-dist/css/bootstrap.css">
</head>
<body style="width: 100%">
<div style="width: 90%;margin: 10px auto;padding-top: 20px">
    <form class="form-horizontal" action="UserInfoQueryServlet" method="post">
        <div class="form-group">
            <label class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="userName" name="userName" placeholder="请输入姓名">
            </div>

            <label class="col-sm-2 control-label">地址</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="userAddress" name="userAddress" placeholder="请输入地址">
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">联系电话</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="userTel" name="userTel" placeholder="请输入联系电话">
            </div>

            <label class="col-sm-2 control-label">注册日期</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="userRegDate" name="userRegDate" placeholder="请输入注册日期">-
                <input type="text" class="form-control" id="userRegDate2" name="userRegDate2" placeholder="请输入注册日期">
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">查询</button>
            </div>
        </div>
    </form>
</div>

<div style="width: 90%;margin: 10px auto">
    <div>
        <table class="table table-hover">
            <thead>
            <tr>
                <th>序号</th>
                <th>姓名</th>
                <th>地址</th>
                <th>联系电话</th>
                <th>注册日期</th>
            </tr>
            </thead>

            <tbody>
            <c:forEach items="${sessionScope.lstQueryUserInfo}" var="eachBean" varStatus="stat">
                <tr>
                    <th scope="row">${stat.index + 1}</th>
                    <td>${eachBean.userName}</td>
                    <td>${eachBean.userAddress}</td>
                    <td>${eachBean.userTel}</td>
                    <td><fmt:formatDate value="${eachBean.userRegDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>

</div>

</body>
</html>
